import request from '@/utils/request'
import { Encrypt } from '@/utils/cryptoJS'

/**
 * 风险对象相关接口
 */
export function useriskObjectApi() {
    return {
        // 查询风险对象列表
        findObject: (data) => {
            const value_Encrypt = Encrypt(JSON.stringify(data))
            return request({
                url: '/hcp-dp/riskObject/findObject',
                method: 'post',
                data: { value: value_Encrypt }
            })
        },

        // 新增风险对象
        addObject: (data) => {
            const value_Encrypt = Encrypt(JSON.stringify(data))
            return request({
                url: '/hcp-dp/riskObject/addObject',
                method: 'post',
                data: { value: value_Encrypt }
            })
        },

        // 修改风险对象
        updateObject: (data) => {
            const value_Encrypt = Encrypt(JSON.stringify(data))
            return request({
                url: '/hcp-dp/riskObject/updateObject',
                method: 'post',
                data: { value: value_Encrypt }
            })
        }
    }
} 